From e793a2dc1888fffb5e422cb14e4913ff36e91384 Mon Sep 17 00:00:00 2001 From: robertlipe Date: Tue, 7 Jan 2014 21:59:17 +0000 Subject: [PATCH] MSVC changes from Gerhard. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4717 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/GPSBabel.pro | 11 +++++++---- gpsbabel/csv_util.cc | 10 ++++++---- gpsbabel/{ => deprecated}/README.magnav | 0 gpsbabel/shapelib/README.GPSBabel | 1 + gpsbabel/shapelib/shpopen.c | 2 ++ 5 files changed, 16 insertions(+), 8 deletions(-) rename gpsbabel/{ => deprecated}/README.magnav (100%) diff --git a/gpsbabel/GPSBabel.pro b/gpsbabel/GPSBabel.pro index 2f6e2db0b..eafe9c4b1 100644 --- a/gpsbabel/GPSBabel.pro +++ b/gpsbabel/GPSBabel.pro @@ -39,14 +39,14 @@ DEPRECIATED_SHAPE=pdbfile.cc FILTERS=position.cc radius.cc duplicate.cc arcdist.cc polygon.cc smplrout.cc \ reverse_route.cc sort.cc stackfilter.cc trackfilter.cc discard.cc \ nukedata.cc interpolate.cc transform.cc height.cc swapdata.cc bend.cc \ - validate.cc + validate.cc -SHAPE=shapelib/shpopen.c shapelib/dbfopen.c +SHAPE=shapelib/shpopen.c shapelib/dbfopen.c shapelib/safileio.c ZLIB=zlib/adler32.c zlib/compress.c zlib/crc32.c zlib/deflate.c zlib/inffast.c \ zlib/inflate.c zlib/infback.c zlib/inftrees.c zlib/trees.c \ - zlib/uncompr.o zlib/gzlib.o zlib/gzclose.o zlib/gzread.o \ - zlib/gzwrite.o zlib/zutil.o + zlib/uncompr.c zlib/gzlib.c zlib/gzclose.c zlib/gzread.c \ + zlib/gzwrite.c zlib/zutil.c JEEPS += jeeps/gpsapp.cc jeeps/gpscom.cc \ jeeps/gpsmath.cc jeeps/gpsmem.cc \ @@ -263,6 +263,7 @@ win32 { win32-msvc*{ DEFINES += _CRT_SECURE_NO_DEPRECATE + INCLUDEPATH += ../../src/core src/core QMAKE_CXXFLAGS += /MP -wd4100 TEMPLATE=vcapp } @@ -282,6 +283,8 @@ macx { SOURCES += $$ALL_FMTS $$FILTERS $$SUPPORT $$SHAPE $$ZLIB $$JEEPS +DEFINES += NEW_STRINGS + # We don't care about stripping things out of the build. Full monty, baby. DEFINES += MAXIMAL_ENABLED DEFINES += FILTERS_ENABLED diff --git a/gpsbabel/csv_util.cc b/gpsbabel/csv_util.cc index c21f7c5bd..e6e9136b1 100644 --- a/gpsbabel/csv_util.cc +++ b/gpsbabel/csv_util.cc @@ -1709,11 +1709,12 @@ xcsv_waypt_pr(const waypoint* wpt) } break; case XT_SHORTNAME: - writebuff(buff, fmp->printfc, #if NEW_STRINGS + writebuff(buff, fmp->printfc, shortname.isEmpty() ? fmp->val : CSTR(shortname)); #else - (shortname && *shortname) ? shortname : fmp->val); + writebuff(buff, fmp->printfc, + (shortname && *shortname) ? shortname : fmp->val); #endif break; case XT_ANYNAME: @@ -1758,11 +1759,12 @@ xcsv_waypt_pr(const waypoint* wpt) #endif break; case XT_DESCRIPTION: - writebuff(buff, fmp->printfc, #if NEW_STRINGS + writebuff(buff, fmp->printfc, description.isEmpty() ? fmp->val : CSTR(description)); #else - (description && *description) ? description : fmp->val); + writebuff(buff, fmp->printfc, + (description && *description) ? description : fmp->val); #endif break; case XT_NOTES: diff --git a/gpsbabel/README.magnav b/gpsbabel/deprecated/README.magnav similarity index 100% rename from gpsbabel/README.magnav rename to gpsbabel/deprecated/README.magnav diff --git a/gpsbabel/shapelib/README.GPSBabel b/gpsbabel/shapelib/README.GPSBabel index 3fb125c8a..8e4fe5eac 100644 --- a/gpsbabel/shapelib/README.GPSBabel +++ b/gpsbabel/shapelib/README.GPSBabel @@ -5,3 +5,4 @@ the amount of size in our tree that it takes and to reduce ongoing merge maintenance. shpopen.c: int32_t instead of int32 was used to eliminate clang warnings. +shpopen.c: include for MSVC. diff --git a/gpsbabel/shapelib/shpopen.c b/gpsbabel/shapelib/shpopen.c index 1fc196a41..480c1b8a4 100644 --- a/gpsbabel/shapelib/shpopen.c +++ b/gpsbabel/shapelib/shpopen.c @@ -272,6 +272,8 @@ #include #include #include +// GPSBabel-local: add stdint for MSVC. +#include SHP_CVSID("$Id: shpopen.c,v 1.73 2012-01-24 22:33:01 fwarmerdam Exp $") -- 2.30.2